﻿<!DOCTYPE html>
<!--基于风险信息库的安全措施-->
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="/static/js/common.js"></script>

    <style>
        body {
            padding-bottom: 10px;
        }
    </style>
</head>
<body>
    
<div id="app" v-cloak>   

        <el-form :model="Form" status-icon style="margin-top:5px;width:100%">

            <div style="width:100% ">
                <label style="font-weight:bold">基于安全风险信息库的安全措施</label>
            </div>

            <el-row>
                <el-col span="18">
                    1. 设备设施 是否在企业正常作业活动开展的环境下，开展维修活动？（如选择“是”，进入安全风险信息
                    库，获取对应的作业活动的安全风险信息，确定安全风险是否对维修人员产生影响，考虑对维
                    修人员的风险控制措施。）
                </el-col>
                <el-col span="6">
                    <el-button type="primary" @click="Input('xg',1,1)">添加步骤</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">否</el-button>
                </el-col>
            </el-row>
            <el-row>
                <el-col span="24">
                    <el-table :data="Form.OperationRelatedActivitiesRish" style="width: 90%;margin-bottom: 20px;" border
                              row-style="height:10px">
                        <el-table-column type="expand">
                            <template slot-scope="props">
                                <el-form label-position="left" inline class="demo-table-expand">
                                    <table style=" width:90%; " cellpadding="0" cellspacing="0">
                                        <thead>
                                            <tr>
                                                <td style="text-align:center">{{JSPAnalyticalManagement.Risk}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.ControlRequirements}}</td>
                                                <td style=" text-align:center">操作</td>
                                            </tr>
                                        </thead>
                                        <tbody v-for="todo in props.row.List">
                                            <tr>
                                                <td style=" text-align:center">{{todo.Risk}}</td>
                                                <td style=" text-align:center">{{todo.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{todo.ControlRequirement}}</td>
                                                <td style=" text-align:center">

                                                    <el-button @click.native.prevent="RomoveRow(todo.id,1)"
                                                               type="text"
                                                               size="small">
                                                        移除
                                                    </el-button>

                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </el-form>
                            </template>
                        </el-table-column>
                        <el-table-column prop="RiskStepsName"
                                         :label="JSPAnalyticalManagement.WorkProcedure">
                        </el-table-column>
                        <el-table-column label="操作">
                            <template slot-scope="scope">
                                <el-button @click.native.prevent="EquipmenFacilitiesInput('xg', scope.row.RiskStepsId)"
                                           type="text"
                                           size="small">
                                    添加风险
                                </el-button>
                                <el-button @click.native.prevent="deleteRow(scope.$index, Form.OperationRelatedActivitiesRish)"
                                           type="text"
                                           size="small">
                                    移除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>

                </el-col>
            </el-row>

            <el-row>
                <el-col span="18">
                    2. 检维修作业活动 是否在企业正常作业活动开展的环境下，开展维修活动？（如选择“是”，进入安全风险信息
                    库，获取对应的作业活动的安全风险信息，确定安全风险是否对维修人员产生影响，考虑对维
                    修人员的风险控制措施。）
                </el-col>
                <el-col span="6">
                    <el-button type="primary" @click="Input('xg',2,2)">添加步骤</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">否</el-button>
                </el-col>
            </el-row>
            <el-row>
                <el-col span="24">
                    <el-table :data="Form.ActivityRish" style="width: 90%;margin-bottom: 20px;" border
                              row-style="height:10px">
                        <el-table-column type="expand">
                            <template slot-scope="props">
                                <el-form label-position="left" inline class="demo-table-expand">
                                    <table style=" width:90%; " cellpadding="0" cellspacing="0">
                                        <thead>
                                            <tr>
                                                <td style="text-align:center">{{JSPAnalyticalManagement.Risk}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.ControlRequirements}}</td>
                                                <td style=" text-align:center">操作</td>
                                            </tr>
                                        </thead>
                                        <tbody v-for="todo in props.row.List">
                                            <tr>
                                                <td style=" text-align:center">{{todo.Risk}}</td>
                                                <td style=" text-align:center">{{todo.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{todo.ControlRequirement}}</td>
                                                <td style=" text-align:center">
                                                    <el-button @click.native.prevent="RomoveRow(todo.id,2)"
                                                               type="text"
                                                               size="small">
                                                        移除
                                                    </el-button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </el-form>
                            </template>
                        </el-table-column>
                        <el-table-column prop="RiskStepsName"
                                         :label="JSPAnalyticalManagement.WorkProcedure">
                        </el-table-column>
                        <el-table-column label="操作">
                            <template slot-scope="scope">
                                <el-button @click.native.prevent="InspectionMaintenanceActivitiesInput('xg',scope.row.RiskStepsId)"
                                           type="text"
                                           size="small">
                                    添加风险
                                </el-button>
                                <el-button @click.native.prevent="deleteRow(scope.$index, Form.ActivityRish)"
                                           type="text"
                                           size="small">
                                    移除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>

            <el-row>
                <el-col span="18">
                    3.操作程序 是否在企业正常作业活动开展的环境下，开展维修活动？（如选择“是”，进入安全风险信息
                    库，获取对应的作业活动的安全风险信息，确定安全风险是否对维修人员产生影响，考虑对维
                    修人员的风险控制措施。）
                </el-col>
                <el-col span="6">
                    <el-button type="primary" @click="Input('xg',3,3)">添加步骤</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">否</el-button>
                </el-col>
            </el-row>
            <el-row>
                <el-col span="24">

                    <el-table :data="Form.OperatingProcedureRish" style="width: 90%;margin-bottom: 20px;" border
                              row-style="height:10px">

                        <el-table-column type="expand">
                            <template slot-scope="props">
                                <el-form label-position="left" inline class="demo-table-expand">
                                    <table style=" width:90%; " cellpadding="0" cellspacing="0">
                                        <thead>
                                            <tr>
                                                <td style="text-align:center">{{JSPAnalyticalManagement.Risk}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.ControlRequirements}}</td>
                                                <td style=" text-align:center">操作</td>
                                            </tr>
                                        </thead>
                                        <tbody v-for="todo in props.row.List">
                                            <tr>
                                                <td style=" text-align:center">{{todo.Risk}}</td>
                                                <td style=" text-align:center">{{todo.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{todo.ControlRequirement}}</td>
                                                <td style=" text-align:center">
                                                    <el-button @click.native.prevent="RomoveRow(todo.id,3)"
                                                               type="text"
                                                               size="small">
                                                        移除
                                                    </el-button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </el-form>
                            </template>
                        </el-table-column>
                        <el-table-column prop="RiskStepsName"
                                         :label="JSPAnalyticalManagement.WorkProcedure">
                        </el-table-column>
                        <el-table-column label="操作">
                            <template slot-scope="scope">
                                <el-button @click.native.prevent="OperatingProceduresInput('xg',scope.row.RiskStepsId)"
                                           type="text"
                                           size="small">
                                    添加风险
                                </el-button>
                                <el-button @click.native.prevent="deleteRow(scope.$index, Form.OperatingProcedureRish)"
                                           type="text"
                                           size="small">
                                    移除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>

            <el-row>
                <el-col span="18">
                    4.操作及相关作业活动 是否在企业正常作业活动开展的环境下，开展维修活动？（如选择“是”，进入安全风险信息
                    库，获取对应的作业活动的安全风险信息，确定安全风险是否对维修人员产生影响，考虑对维
                    修人员的风险控制措施。）
                </el-col>
                <el-col span="6">
                    <el-button type="primary" @click="Input('xg',4,4)">添加步骤</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">否</el-button>
                </el-col>
            </el-row>
            <el-row>
                <el-col span="24">
                    <el-table :data="Form.InspectionMaintenanceActivitiesRish" style="width: 90%;margin-bottom: 20px;" border
                              row-style="height:10px">

                        <el-table-column type="expand">
                            <template slot-scope="props">
                                <el-form label-position="left" inline class="demo-table-expand">
                                    <table style=" width:90%; " cellpadding="0" cellspacing="0">
                                        <thead>
                                            <tr>
                                                <td style="text-align:center">{{JSPAnalyticalManagement.Risk}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.ControlRequirements}}</td>
                                                <td style=" text-align:center">操作</td>
                                            </tr>
                                        </thead>
                                        <tbody v-for="todo in props.row.List">
                                            <tr>
                                                <td style=" text-align:center">{{todo.Risk}}</td>
                                                <td style=" text-align:center">{{todo.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{todo.ControlRequirement}}</td>
                                                <td style=" text-align:center">

                                                    <el-button @click.native.prevent="RomoveRow(todo.id,4)"
                                                               type="text"
                                                               size="small">
                                                        移除
                                                    </el-button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </el-form>
                            </template>
                        </el-table-column>
                        <el-table-column prop="RiskStepsName"
                                         :label="JSPAnalyticalManagement.WorkProcedure">
                        </el-table-column>
                        <el-table-column label="操作">
                            <template slot-scope="scope">
                                <el-button @click.native.prevent="OperationRelatedActivitiesInput('xg',scope.row.RiskStepsId)"
                                           type="text"
                                           size="small">
                                    添加风险
                                </el-button>
                                <el-button @click.native.prevent="deleteRow(scope.$index, Form.InspectionMaintenanceActivitiesRish)"
                                           type="text"
                                           size="small">
                                    移除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>

            <el-row>
                <el-col span="18">
                    5. 场所环境 是否在企业正常作业活动开展的环境下，开展维修活动？（如选择“是”，进入安全风险信息
                    库，获取对应的作业活动的安全风险信息，确定安全风险是否对维修人员产生影响，考虑对维
                    修人员的风险控制措施。）
                </el-col>
                <el-col span="6">
                    <el-button type="primary" @click="Input('xg',5,5)">添加步骤</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">否</el-button>
                </el-col>
            </el-row>
            <el-row>
                <el-col span="24">

                    <el-table :data="Form.EquipmentFacilitiesRish" style="width: 90%;margin-bottom: 20px;" border
                              row-style="height:10px">

                        <el-table-column type="expand">
                            <template slot-scope="props">
                                <el-form label-position="left" inline class="demo-table-expand">
                                    <table style=" width:90%; " cellpadding="0" cellspacing="0">
                                        <thead>
                                            <tr>
                                                <td style="text-align:center">{{JSPAnalyticalManagement.Risk}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.ControlRequirements}}</td>
                                                <td style=" text-align:center">操作</td>
                                            </tr>
                                        </thead>
                                        <tbody v-for="todo in props.row.List">
                                            <tr>
                                                <td style=" text-align:center">{{todo.Risk}}</td>
                                                <td style=" text-align:center">{{todo.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{todo.ControlRequirement}}</td>
                                                <td style=" text-align:center">

                                                    <el-button @click.native.prevent="RomoveRow(todo.id,5)"
                                                               type="text"
                                                               size="small">
                                                        移除
                                                    </el-button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </el-form>
                            </template>
                        </el-table-column>
                        <el-table-column prop="RiskStepsName"
                                         :label="JSPAnalyticalManagement.WorkProcedure">
                        </el-table-column>
                        <el-table-column label="操作">
                            <template slot-scope="scope">
                                <el-button @click.native.prevent="PlaceEnvironmentInput('xg',scope.row.RiskStepsId)"
                                           type="text"
                                           size="small">
                                    添加风险
                                </el-button>
                                <el-button @click.native.prevent="deleteRow(scope.$index, Form.EquipmentFacilitiesRish)"
                                           type="text"
                                           size="small">
                                    移除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>

            <el-row>
                <el-col span="18">
                    6. 工艺介质 是否在企业正常作业活动开展的环境下，开展维修活动？（如选择“是”，进入安全风险信息
                    库，获取对应的作业活动的安全风险信息，确定安全风险是否对维修人员产生影响，考虑对维
                    修人员的风险控制措施。）
                </el-col>
                <el-col span="6">
                    <el-button type="primary" @click="Input('xg',6,6)">添加步骤</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">否</el-button>
                </el-col>
            </el-row>
            <el-row>
                <el-col span="24">

                    <el-table :data="Form.ProcessMediumRish" style="width: 90%;margin-bottom: 20px;" border
                              row-style="height:10px">

                        <el-table-column type="expand">
                            <template slot-scope="props">
                                <el-form label-position="left" inline class="demo-table-expand">
                                    <table style=" width:90%; " cellpadding="0" cellspacing="0">
                                        <thead>
                                            <tr>
                                                <td style="text-align:center">{{JSPAnalyticalManagement.Risk}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.ControlRequirements}}</td>
                                                <td style=" text-align:center">操作</td>
                                            </tr>
                                        </thead>
                                        <tbody v-for="todo in props.row.List">
                                            <tr>
                                                <td style=" text-align:center">{{todo.Risk}}</td>
                                                <td style=" text-align:center">{{todo.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{todo.ControlRequirement}}</td>
                                                <td style=" text-align:center">

                                                    <el-button @click.native.prevent="RomoveRow(todo.id,6)"
                                                               type="text"
                                                               size="small">
                                                        移除
                                                    </el-button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </el-form>
                            </template>
                        </el-table-column>
                        <el-table-column prop="RiskStepsName"
                                         :label="JSPAnalyticalManagement.WorkProcedure">
                        </el-table-column>
                        <el-table-column label="操作">

                            <template slot-scope="scope">
                                <el-button @click.native.prevent="ProcessMediumInput('xg',scope.row.RiskStepsId)"
                                           type="text"
                                           size="small">
                                    添加风险
                                </el-button>
                                <el-button @click.native.prevent="deleteRow(scope.$index, Form.ProcessMediumRish)"
                                           type="text"
                                           size="small">
                                    移除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>
           
            <el-row>
                <el-col span="18">
                    7.作业活动 是否在企业正常作业活动开展的环境下，开展维修活动？（如选择“是”，进入安全风险信息
                    库，获取对应的作业活动的安全风险信息，确定安全风险是否对维修人员产生影响，考虑对维
                    修人员的风险控制措施。）
                </el-col>
                <el-col span="6">
                    <el-button type="primary" @click="Input('xg',7,7)">添加步骤</el-button>
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">否</el-button>
                </el-col>
            </el-row>
            <el-row>
                <el-col span="24">
                    <el-table :data="Form.PlaceEnvironmentRish" style="width: 90%;margin-bottom: 20px;" border
                              row-style="height:10px">

                        <el-table-column type="expand">
                            <template slot-scope="props">
                                <el-form label-position="left" inline class="demo-table-expand">
                                    <table style=" width:90%; " cellpadding="0" cellspacing="0">
                                        <thead>
                                            <tr>
                                                <td style="text-align:center">{{JSPAnalyticalManagement.Risk}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{JSPAnalyticalManagement.ControlRequirements}}</td>
                                                <td style=" text-align:center">操作</td>
                                            </tr>
                                        </thead>
                                        <tbody v-for="todo in props.row.List">
                                            <tr>
                                                <td style=" text-align:center">{{todo.Risk}}</td>
                                                <td style=" text-align:center">{{todo.HazardousFactors}}</td>
                                                <td style=" text-align:center">{{todo.ControlRequirement}}</td>
                                                <td style=" text-align:center">

                                                    <el-button @click.native.prevent="RomoveRow(todo.id,7)"
                                                               type="text"
                                                               size="small">
                                                        移除
                                                    </el-button>
                                                </td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </el-form>
                            </template>
                        </el-table-column>
                        <el-table-column prop="RiskStepsName"
                                         :label="JSPAnalyticalManagement.WorkProcedure">
                        </el-table-column>
                        <el-table-column label="操作">
                            <template slot-scope="scope">
                                <el-button @click.native.prevent="WorkAtivitiesInput('xg',scope.row.RiskStepsId)"
                                           type="text"
                                           size="small">
                                    添加风险
                                </el-button>
                                <el-button @click.native.prevent="deleteRow(scope.$index, Form.PlaceEnvironmentRish)"
                                           type="text"
                                           size="small">
                                    移除
                                </el-button>
                            </template>
                        </el-table-column>
                    </el-table>
                </el-col>
            </el-row>
            <div style="width:100% ">
                <label style="font-weight:bold">其它安全措施</label>
            </div>
            <el-row>
                <el-col span="24">
                    <el-input type="textarea" style="width:90%;margin-top:3px;border:none" v-model="Form.BasicSecurityMeasuresOther"></el-input>
                </el-col>
            </el-row>
            <el-row>
                <el-form-item style="text-align:center; padding-top:5px">
                    <el-button type="primary" @click="onSubmitForm('ruleForm')">{{col.btnSave}}</el-button>
                </el-form-item>
            </el-row>
        </el-form>

        <el-dialog title="" :visible.sync="ListItem.dialogVisible" width="90%" height="95%" top="10vh">
            <iframe ref="iframe" :src="ListItem.InputUrl" style="height:95%;width:100%" frameborder="0"></iframe>
        </el-dialog>
    </div>
    <script type="text/javascript">
     
    app = new Vue({

        el: '#app',
        data: {
            id: [],
            ids: '',
            Form: {
                
                    OperationRelatedActivitiesRish: [],//操作及相关作业活动风险
                    ActivityRish: [],//作业活动风险
                    OperatingProcedureRish: [],//操作程序风险
                    InspectionMaintenanceActivitiesRish: [],//检维修作业活动风险
                    EquipmentFacilitiesRish: [],//设备设施风险
                    ProcessMediumRish: [],//工艺介质风险
                    PlaceEnvironmentRish: [],//场所环境风险

                    RiskIdentificationSafety: '',//风险识别及安全措施
                    BasicSecurityMeasures: '', //基础安全措施
                    BasicSecurityMeasuresComment: '',
                    BasicSecurityMeasuresOther:'',
                },
                OperationRelatedActivitiesRish:[],//操作及相关作业活动风险
                ActivityRish: [],//作业活动风险
                OperatingProcedureRish: [],//操作程序风险
                InspectionMaintenanceActivitiesRish:[],//检维修作业活动风险
                EquipmentFacilitiesRish: [],//设备设施风险
                ProcessMediumRish:[],//工艺介质风险
                PlaceEnvironmentRish: [],//场所环境风险

                rules: {},
                ListItem: ListItem,

            },
            methods: {
                //解決edge下select bug
                visibleChange: function (isVisible) {
                    visibleChange(isVisible)
                },
                Input: function (val, id, Steps) {
                    DialogShow(this, val, "../StasRiskControlInformationDatabase/RiskStepsInput.html", id, "Steps=" + Steps);
                },
                handleNodeClick: function (data) {
                    console.log(data);
                },
                deleteRow: function (index, rows) {
                    rows.splice(index, 1);
                },
                getData: function () {
                    // getDataAdd(this, '/api/JSPAnalyticalManagement/getRish?id=' + this.ids);
                    var id = [];
                    $.extend(true, id, parent.app.Form.RiskIdentificationSafety);
                    //var myuser = {
                    //    OperationRelatedActivitiesRish: [], ActivityRish: [], OperatingProcedureRish: [], InspectionMaintenanceActivitiesRish: [],
                    //    EquipmentFacilitiesRish: [], ProcessMediumRish: [], PlaceEnvironmentRish: []
                    //};
                    for (var i = 0; i < id.length; i++) {
                        if (id[i].RiskTypeId == 0) {
                            this.Form.OperationRelatedActivitiesRish.push(id[i]);
                            continue;
                        } else if (id[i].RiskTypeId == 1) {
                            this.Form.ActivityRish.push(id[i]);
                            continue;
                        }
                        else if (id[i].RiskTypeId == 2) {
                            this.Form.OperatingProcedureRish.push(id[i]);
                            continue;
                        }
                        else if (id[i].RiskTypeId == 3) {
                            this.Form.InspectionMaintenanceActivitiesRish.push(id[i]);
                            continue;
                        }
                        else if (id[i].RiskTypeId == 4) {
                            this.Form.EquipmentFacilitiesRish.push(id[i]);
                            continue;
                        }
                        else if (id[i].RiskTypeId == 5) {
                            this.Form.ProcessMediumRish.push(id[i]);
                            continue;
                        }
                        else if (id[i].RiskTypeId == 6) {
                            this.Form.PlaceEnvironmentRish.push(id[i]);
                            continue;
                        }
                    }
                },
                shiyong: function () {
                    this.Form.BasicSecurityMeasures = this.BasicSecurity;
                    //parent.app.Form.Applicable = 1; //是否适用
                },
                shiyong: function () {
                    this.Form.BasicSecurityMeasures = this.BasicSecurity;
                },
                
                EquipmenFacilitiesInput: function (val, id){
                    DialogShow(this, val, "../StasRiskControlInformationDatabase/EquipmenFacilitiesList.html", id);
                },
                InspectionMaintenanceActivitiesInput: function (val, id) { DialogShow(this, val, "../StasRiskControlInformationDatabase/InspectionMaintenanceActivitiesList.html", id); },
                OperatingProceduresInput: function (val, id) { DialogShow(this, val, "../StasRiskControlInformationDatabase/OperatingProceduresList.html", id); },
                OperationRelatedActivitiesInput: function (val, id) { DialogShow(this, val, "../StasRiskControlInformationDatabase/OperationRelatedActivitiesList.html", id); },
                PlaceEnvironmentInput: function (val, id) { DialogShow(this, val, "../StasRiskControlInformationDatabase/PlaceEnvironmentList.html", id); },
                ProcessMediumInput: function (val, id) { DialogShow(this, val, "../StasRiskControlInformationDatabase/ProcessMediumList.html", id); },
                WorkAtivitiesInput: function (val, id) { DialogShow(this, val, "../StasRiskControlInformationDatabase/WorkAtivitiesList.html", id); },

                RomoveRow: function (val, id) {
                    switch (id) {
                        case 1:
                            var b = false
                            for (var i = 0; i < this.Form.OperationRelatedActivitiesRish.length; i++) {
                                var item = this.Form.OperationRelatedActivitiesRish[i].List;
                                for (var j = 0; j < item.length; j++) {
                                    if (item[j].id == val) {
                                        item.splice(j, 1);
                                        b = true
                                        break;
                                    }
                                }
                                if (b) {
                                    break;
                                }
                            }
                            break;
                        case 2:
                            for (var i = 0; i < this.Form.ActivityRish.length; i++) {
                                var item = this.Form.ActivityRish[i].List;
                                for (var j = 0; j < item.length; j++) {
                                    if (item[j].id == val) {
                                        item.splice(j, 1);
                                        break;
                                    }
                                }
                            }
                            break;
                        case 3:
                            for (var i = 0; i < this.Form.OperatingProcedureRish.length; i++) {
                                var item = this.Form.OperatingProcedureRish[i].List;
                                for (var j = 0; j < item.length; j++) {
                                    if (item[j].id == val) {
                                        item.splice(j, 1);
                                        break;
                                    }
                                }
                            }
                            break;
                        case 4:
                            for (var i = 0; i < this.Form.InspectionMaintenanceActivitiesRish.length; i++) {
                                var item = this.Form.InspectionMaintenanceActivitiesRish[i].List;
                                for (var j = 0; j < item.length; j++) {
                                    if (item[j].id == val) {
                                        item.splice(j, 1);
                                        break;
                                    }
                                }
                            }
                            break;
                        case 5:
                            for (var i = 0; i < this.Form.EquipmentFacilitiesRish.length; i++) {
                                var item = this.Form.EquipmentFacilitiesRish[i].List;
                                for (var j = 0; j < item.length; j++) {
                                    if (item[j].id == val) {
                                        item.splice(j, 1);
                                        break;
                                    }
                                }
                            }
                            break;
                        case 6:
                            for (var i = 0; i < this.Form.ProcessMediumRish.length; i++) {
                                var item = this.Form.ProcessMediumRish[i].List;
                                for (var j = 0; j < item.length; j++) {
                                    if (item[j].id == val) {
                                        item.splice(j, 1);
                                        break;
                                    }
                                }
                            }
                            break;
                        case 7:
                            for (var i = 0; i < this.Form.PlaceEnvironmentRish.length; i++) {
                                var item = this.Form.PlaceEnvironmentRish[i].List;
                                for (var j = 0; j < item.length; j++) {
                                    if (item[j].id == val) {
                                        item.splice(j, 1);
                                        break;
                                    }
                                }
                            }
                            break;
                    }
                },
                //提交数据
                onSubmitForm: function (formName) {
                    parent.app.Form.RiskIdentificationSafety.length = 0;
                    if (this.Form.OperationRelatedActivitiesRish.length > 0) {
                        for (var i = 0; i < this.Form.OperationRelatedActivitiesRish.length; i++) {
                            parent.app.Form.RiskIdentificationSafety.push(this.Form.OperationRelatedActivitiesRish[i]);
                        }
                    }
                    if (this.Form.ActivityRish.length > 0) {
                        for (var i = 0; i < this.Form.ActivityRish.length; i++) {
                            parent.app.Form.RiskIdentificationSafety.push(this.Form.ActivityRish[i]);
                        }
                    }
                    if (this.Form.OperatingProcedureRish.length > 0) {
                        for (var i = 0; i < this.Form.OperatingProcedureRish.length; i++) {
                            parent.app.Form.RiskIdentificationSafety.push(this.Form.OperatingProcedureRish[i]);
                        }
                    }
                    if (this.Form.InspectionMaintenanceActivitiesRish.length > 0) {
                        for (var i = 0; i < this.Form.InspectionMaintenanceActivitiesRish.length; i++) {
                            parent.app.Form.RiskIdentificationSafety.push(this.Form.InspectionMaintenanceActivitiesRish[i]);
                        }
                    }
                    if (this.Form.EquipmentFacilitiesRish.length > 0) {
                         
                        for (var i = 0; i < this.Form.EquipmentFacilitiesRish.length; i++) {
                            parent.app.Form.RiskIdentificationSafety.push(this.Form.EquipmentFacilitiesRish[i]);
                        }
                    }
                    if (this.Form.ProcessMediumRish.length > 0) {
                        for (var i = 0; i < this.Form.ProcessMediumRish.length; i++) {
                            parent.app.Form.RiskIdentificationSafety.push(this.Form.ProcessMediumRish[i]);
                        }
                    }
                    if (this.Form.PlaceEnvironmentRish.length > 0) {
                        for (var i = 0; i < this.Form.PlaceEnvironmentRish.length; i++) {
                            parent.app.Form.RiskIdentificationSafety.push(this.Form.PlaceEnvironmentRish[i]);
                        }
                    }
                   // parent.app.Form.BasicSecurityMeasuresOther = this.Form.BasicSecurityMeasuresOther  //其他
                  //  parent.app.Form.BasicSecurityMeasures = this.Form.BasicSecurityMeasures   //试用
                    parent.app.ListItem.dialogVisible = false;
                },
            },
            mounted: function () {     
                //this.id = parent.app.Form.RiskIdentificationSafety;
                //for (var i = 0; i < this.id.length; i++) {
                //    this.ids += this.id[i].RiskStepsId + ',';
                //}
                //this.ids = this.ids.substring(0, this.ids.length-1)
                this.getData();
                console.log(this.Form);
            }
        });
    </script>
</body>


</html>